# Maintainer: Jerome Leclanche <jerome@leclan.ch>
# Co-Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>

pkgname=libsysstat
pkgver=0.4.6
pkgrel=2
pkgdesc="Library to query system statistics (net, resource usage, ...)"
arch=("loong64" "x86_64")
url="https://github.com/lxqt/$pkgname"
license=("LGPL2.1")
depends=("qt5-base")
makedepends=("lxqt-build-tools")
source=(
	"https://github.com/lxqt/libsysstat/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
	"https://github.com/lxqt/libsysstat/releases/download/$pkgver/$pkgname-$pkgver.tar.xz.asc"
)
sha512sums=('dd0e6f67509658691082b043e06589c6a89eea016a0e68cdb7d377f25a0bc63aa476b5eb90f230593daab462a9e22f6f636c0723110fb36faeea7c0aa6d0b85b'
            'SKIP')
validpgpkeys=(
	"169704C6FB490C6892C7F23C37E0AF1FDA48F373"  # Jerome Leclanche <jerome@leclan.ch>
	"7C733BA5F585AAD669E4D23A42C9C8D3AF5EA5E3"  # Alf Gaida <agaida@siduction.org>
	"19DFDF3A579BD509DBB572D8BE793007AD22DF7E"  # Pedram Pourang <tsujan2000@gmail.com>
)

build() {
	mkdir -p build
	cd build
	cmake "$srcdir/$pkgname-$pkgver" \
		-DCMAKE_INSTALL_PREFIX=/usr
	make
}

package() {
	cd build
	make DESTDIR="$pkgdir" install
}
